package net.love5z.web.common.velocity.tools;

import java.util.ArrayList;
import java.util.List;

public class PageNavTool {

    public class PageItem {
        private String id;
        private String name;
        private String url;

        public final String getId() {
            return id;
        }

        public final void setId(String id) {
            this.id = id;
        }

        public final String getName() {
            return name;
        }

        public final void setName(String name) {
            this.name = name;
        }

        public final String getUrl() {
            return url;
        }

        public final void setUrl(String url) {
            this.url = url;
        }

    }

    private List<PageItem> list = new ArrayList<PageItem>();

    public void addPageItem(String id, String name, String url) {
        PageItem item = new PageItem();
        item.setId(id);
        item.setName(name);
        item.setUrl(url);

        list.add(item);
    }

    public List<PageItem> list() {
        return list;
    }

}
